package net.lijingye.education.service;

import net.lijingye.education.entity.Token;
import net.lijingye.education.exception.AlreadyLoginException;
import net.lijingye.education.exception.DaoException;
import net.lijingye.education.exception.ObjectNotExistsException;
import net.lijingye.education.exception.PasswordNotMatchException;
import org.springframework.stereotype.Service;

/**
 * Created by LijingYe on 2016/4/3.
 */
@Service
public interface AuthService {
    Token doLogin(String userId, String userPassword) throws DaoException, ObjectNotExistsException, PasswordNotMatchException, AlreadyLoginException;

    void doLogout(String accessToken) throws DaoException;

    void changePassword(String accessToken, String password, String newPassword) throws DaoException, PasswordNotMatchException;

    boolean isAccessTokenValid(String accessToken);
}
